<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>   
<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  
<html>
  <head>
    <base href="<%=basePath%>">  
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/edittable.css"  ></link>  
	<link rel="stylesheet" type="text/css" href="css/validate.css"  ></link>  
	<script type="text/javascript"  src="js/jquery-1.8.0.js"></script>
  </head>
  <script>
	  $(function(){
			$("input[type=submit]").click(function(){
				if(confirm("确认要提交吗")){
					$.ajax({
						url:"RoleServlet.do",
						type:"post",
						data:{roleName:$("#roleName").val(),des:$(".txtarea").val(),flag:"roleUpd",id:'${roleInfo.id}'},
						success:function(data){
							$("#result_msg").html(data);
						}
					});
				}
			});
			$("input[type=reset]").click(function(){
				$("#roleName").val("");
				$(".txtarea").val("");
			});
		});
  </script>
  <body>
    <div class ="div_title">
		 <div class="div_titlename"> <img src="images/san_jiao.gif" ><span>角色修改</span></div>
	 </div>
		 <table class="edit_table" >
		 		<tr>
		 			 	<td class="td_info">角色名称:</td>	
		 			 	<td class="td_input_short"> 
		 			 		<input type="text" class="txtbox" id="roleName" name="roleName" value="${roleInfo.roleName }"/> 
		 			 	</td>   
		 		</tr>
		 			<tr>
		 				<td class="td_info">角色描述:</td>	
		 				<td>
		 					<textarea rows="4" cols="27" name="note" class="txtarea" >${roleInfo.des }</textarea>
		 				</td> 
		 		</tr>
		 		<tr>
		 			<td class="td_info"> </td>	
		 			<td> 
		 			<input class="form_btn" type="submit" value="提交" /> 
		 			<input type="reset"  class="form_btn" value="重置" /> </td>	
		 			<td>
		 				<label id="result_msg" class="result_msg"></label>
		 			</td>	
		 		</tr>
		</table>
  </body>
</html>